package com.alib.springcloud.service;

import com.alib.springcloud.service.fallback.OrderServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


// Feign 的 接口实现; 已整合 服务降级 Hystrix
@Component
@FeignClient(value = "CLOUD-PROVIDER-PAYMENT8001-HYSTRIX", fallback = OrderServiceFallBack.class)
public interface OrderService {

    @GetMapping("/payment/hystrix/ok/{id}")
    public String paymentInfo_OK(@PathVariable("id") Integer id);


    @GetMapping("/payment/hystrix/error/{id}")
    public String paymentInfo_Error(@PathVariable("id") Integer id);
}
